package com.zzl.study.sharding.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author: zhangzl
 * @date: 2022/6/28 15:28
 * @version: 1.0
 * @description: MybatisPlus配置类
 */
@Configuration
public class MybatisPlusConfig {

    /**
     * 向Spring容器中注入一个MybatisPlus分页拦截器
     *
     * @return MybatisPlus分页拦截器
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }

}
